<?php

namespace App\Controllers;

class ErrorController {

    /**
     * 404 NOT FOUNT
     *
     * @param $message
     * @return void
     */
    public static function notFound($message = '资源不存在!') {
        http_response_code(404);

        loadView('error', [
            'status'=> '404',
            'message'=> $message
        ]);
    }


    /**
<<<<<<< HEAD
     * 404 无权限错误
=======
     * 404 无权限错误是
>>>>>>> 97de34e9c8de98a7ea83385fbbbcc59304343bb6
     *
     * @param $message
     * @return void
     */
    public static function unauthorized($message = '你并没有访问该资源的权限!') {
        http_response_code(403);

        loadView('error', [
            'status'=> '403',
            'message'=> $message
        ]);
    }



}